<?php

namespace App\Exports;

use Maatwebsite\Excel\Concerns\FromArray;
use Maatwebsite\Excel\Concerns\WithColumnFormatting;

class MedicineExport implements FromArray
{
    protected $data;
    protected $col;


    public function __construct(array $data,array $col = [])
    {
        $this->data = $data;
        $this->col = $col;
    }

    /**
     * @return array
     */
    public function array(): array
    {
        // TODO: Implement array() method.
        return $this->data;
    }
    public function columnFormats(): array
    {
        // TODO: Implement columnFormats() method.
        if (isset($this->col['upc'])){
            $key = array_search('upc',$this->col);

        }
        return [];
    }
}
